﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SubjectList.aspx.cs" Inherits="BOH.ControlPanel.SubjectList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
    <link href="../style/css.css" type="text/css" rel="Stylesheet" />
    <script src="../js/jquery-1.3.2.js" type="text/javascript"></script>
    <script src="../js/common.js" type="text/javascript"></script>
    <script>
    $(document).ready(function() {
        $("#headercheck").click(selectAll);
        $(".itemCheckBox").click(selectItem);
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
   <div id="divNavigation">
       当前位置:<a href="OverView.aspx" target="frameControl">评审管理系统</a> >> 学科组列表
    </div>
    <div id="bodyDiv">
        <div id="divSearch">
                    学科组名称:<asp:TextBox ID="txtSubject" Width="120px" runat="server"></asp:TextBox>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                     状态:<asp:DropDownList ID="drpStatus" Width="100px" runat="server">
                                <asp:ListItem  Selected="True" Value="">全部</asp:ListItem>
                                <asp:ListItem Value="A">激活</asp:ListItem>
                                <asp:ListItem Value="D">未激活</asp:ListItem>
                            </asp:DropDownList>&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="butSearch" runat="server" Text="查 询" Width="100px" 
                        onclick="butSearch_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Button ID="butDelet" Text="删 除" runat="server" Width="100px" 
                        onclick="butDelet_Click" />
                     &nbsp;&nbsp;&nbsp;&nbsp;
                     <input id="butAddNew" value="新 增" type="button" style="width:100px"  onclick="window.location='SubjectModify.aspx' "/>
        </div>
    </div>
    <div id="divGrid">
        <asp:HiddenField ID="hiddenSelected" runat="server" />
        <asp:GridView ID="SubjectViewList" runat="server" AutoGenerateColumns="False"  Width="90%"
            CssClass="Grid" AllowPaging="True" PageSize="15">
            <PagerSettings Mode="NumericFirstLast" />
            <Columns>
              <asp:TemplateField>
                <HeaderTemplate>
                    <input id="headercheck" type="checkbox" />
                </HeaderTemplate>
                <ItemTemplate>
                     <input id="itemChk_<%#Eval("ID") %>" type="checkbox" value="<%#Eval("ID") %>"  class="itemCheckBox"/>
                </ItemTemplate>
                <HeaderStyle  Width="30px"/>
              </asp:TemplateField>
                <asp:TemplateField HeaderText="学科组名称">
                    <ItemTemplate>
                        <asp:Label ID="labUserName" Text='<%#Eval("SubjectName") %>' runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="评审组">
                    <ItemTemplate>
                        <asp:Label ID="labUserName" Text='<%#getAccreditationLevel(Eval("AccreditationLevel").ToString()) %>' runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="编号">
                    <ItemTemplate>
                        <asp:Label ID="labUserName" Text='<%#Eval("SubjectID") %>' runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="状态">
                    <ItemTemplate>
                        <asp:Label ID="labUserName" Text='<%#getStatus(Eval("status").ToString()) %>' runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="排序序号">
                    <HeaderStyle Width="100px" />
                    <ItemStyle Width="100px" />         
                    <ItemTemplate>
                        <asp:Label ID="labUserName" Text='<%#Eval("OrderID") %>' runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField  HeaderText ="修改">
                    <ItemTemplate>
                        <a  href="SubjectModify.aspx?type=edit&ID=<%#Eval("ID") %>"  target="frameControl">修改</a> 
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <AlternatingRowStyle CssClass="ARow" />
        </asp:GridView>
        <div id="divPager">
           <asp:Label ID="labNoRecord" Visible="false" runat="server" Text="查询结果为空!"></asp:Label>
            <webdiyer:aspnetpager id="AspNetPager1" runat="server" PageSize="15" AlwaysShow="True" OnPageChanged="AspNetPager1_PageChanged" ShowCustomInfoSection="Left" CustomInfoSectionWidth="35%" ShowPageIndexBox="always" PageIndexBoxType="DropDownList"
    CustomInfoHTML="第<font color='red'><b>%currentPageIndex%</b></font>页，共%PageCount%页，每页显示%PageSize%条记录"></webdiyer:aspnetpager>
        </div>
       </div>
    </form>
</body>
</html>
